<extend name="public/base" />
<block name="content">
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <volist name="group" id="vo">
                <li <eq name="key" value="1">class="layui-this"</eq>> {$vo}配置 </li>
            </volist>
        </ul>
        <div class="layui-tab-content">
            <volist name="list" id="list">
                <div class='layui-tab-item <eq name="list.id" value="1">layui-show</eq>'>
                    <form action="{:url()}" method="post" class="layui-form">
                        <volist name="list['list']" id="config">
                            <div class="layui-form-item">
                                <label class="layui-form-label">{$config.title}</label>
                                <switch name="config.type">
                                    <case value="0">
                                        <div class="layui-input-inline">
                                            <input type="text" name="config[{$config.name}]" value="{$config.value}" class="layui-input">
                                        </div>
                                        <div class="layui-form-mid layui-word-aux">{$config.remark}</div>
                                    </case>
                                    <case value="1">
                                        <div class="layui-input-block">
                                            <input type="text" name="config[{$config.name}]" value="{$config.value}" class="layui-input">
                                            <div class="layui-form-mid layui-word-aux">{$config.remark}</div>
                                        </div>
                                    </case>
                                    <case value="2|3">
                                        <div class="layui-input-block">
                                            <textarea name="config[{$config.name}]" class="layui-textarea">{$config.value}</textarea>
                                            <div class="layui-form-mid layui-word-aux">{$config.remark}</div>
                                        </div>
                                    </case>
                                    <case value="4">
                                        <div class="layui-input-inline">
                                            <select name="config[{$config.name}]">
                                                <option value="">请选择</option>
                                                <volist name=":\app\common\library\Config::parse_config_attr($config['extra'])" id="v">
                                                    <option value="{$key}" <eq name="config.value" value="$key">selected</eq> >{$v}</option>
                                                </volist>
                                            </select>
                                        </div>
                                        <div class="layui-form-mid layui-word-aux">{$config.remark}</div>
                                    </case>
                                    </default>
                                    <div class="layui-input-block">
                                        <input type="text" name="config[{$config.name}]" value="{$config.value}" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">{$config.remark}</div>
                                </switch>
                            </div>
                        </volist>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="layform"><i class="fa fa-save"></i> 保存</button>
                                <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary"><i class="fa fa-undo"></i> 重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </volist>
        </div>
    </div>
</block>